package cn.csc.module.order.convert.item;

import cn.csc.framework.common.pojo.PageResult;
import cn.csc.module.distribute.api.order.dto.DistributeOrderDTO;
import cn.csc.module.order.api.item.dto.OrderItemRespDTO;
import cn.csc.module.order.api.order.dto.OrderItemDTO;
import cn.csc.module.order.controller.admin.item.vo.*;
import cn.csc.module.order.controller.admin.order.vo.OrderUpdateDeliveryReqVO;
import cn.csc.module.order.controller.app.order.vo.AppOrderItemCreateReqVO;
import cn.csc.module.order.controller.app.order.vo.AppOrderItemDetailRespVO;
import cn.csc.module.order.controller.app.vo.OrderItemReqVO;
import cn.csc.module.order.controller.app.vo.OrderItemVO;
import cn.csc.module.order.dal.dataobject.item.OrderItemDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 订单项 Convert
 *
 * @author liuchuang
 */
@Mapper
public interface OrderItemConvert {

    OrderItemConvert INSTANCE = Mappers.getMapper(OrderItemConvert.class);

    OrderItemDO convert(OrderItemCreateReqVO bean);

    OrderItemDO convert(OrderItemUpdateReqVO bean);

    OrderItemRespVO convert(OrderItemDO bean);

    List<OrderItemRespVO> convertList(List<OrderItemDO> list);

    PageResult<OrderItemRespVO> convertPage(PageResult<OrderItemDO> page);

    List<OrderItemExcelVO> convertList02(List<OrderItemDO> list);

    List<OrderItemRespDTO> convertList03(List<OrderItemDO> list);

    OrderItemCreateReqVO convertC(OrderItemDO bean);

    List<OrderItemVO> convertVoList(List<OrderItemDO> list);

    List<OrderItemDTO> convertDtoList(List<OrderItemDO> list);

    List<OrderItemVO> convertVOList(List<OrderItemDO> list);

    OrderItemUpdateReqVO convert(OrderItemReqVO bean);

    OrderItemCreateReqVO convertCreateReqVO(OrderItemReqVO bean);

    List<OrderItemDO> convertDOList(List<OrderUpdateDeliveryReqVO> list);

    OrderItemVO convert01(OrderItemDO bean);

    AppOrderItemDetailRespVO convert02(OrderItemDO bean);


    OrderWithItemPageRespVO convert03(OrderItemDO bean);

    List<AppOrderItemCreateReqVO> convertVoList01(List<OrderItemDO> list);

    List<OrderItemDO> convertDOList02(List<AppOrderItemCreateReqVO> list);
    List<DistributeOrderDTO> convertVoList04(List<OrderItemDO> list);
}
